/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package editor;

import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;

import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import javax.swing.border.BevelBorder;

/**
 *
 * @author RoderickNestor
 */
public class PanelSouth extends JPanel {
    
    private JLabel status;
    private JTextArea textdebug;
    
    public PanelSouth() {
        status = new JLabel("");
        textdebug = new JTextArea(5, 20);
        JScrollPane scrollPane = new JScrollPane(textdebug, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        textdebug.setLineWrap(true);
        textdebug.setEditable(false);
        JPanel statusPanel = new JPanel();
        statusPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));
        statusPanel.setPreferredSize(new Dimension(this.getWidth(), 16));
        statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));
        JLabel statusLabel = new JLabel("AgileLang");
        statusLabel.setHorizontalAlignment(SwingConstants.LEFT);
        statusPanel.add(statusLabel);
        this.setLayout(new BorderLayout());
        this.add(scrollPane, BorderLayout.NORTH);
        this.add(statusPanel, BorderLayout.SOUTH);
    }
    
    public void setStatus(String text) {
        status.setText(text);
    }
    
    public void setDebug(String text) {
        textdebug.setText(text);
    }
    
    public JTextArea getDebug() {
        return textdebug;
    }
    
    public void appendDebug(String text) {
        textdebug.append(text);
        textdebug.append("\n");
    }
    
}
